//
//  XMAlertAction.h
//  MotoEye
//
//  Created by 徐盟 on 2023/4/20.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef  void(^XMAlertActionActionBlock)();

@interface XMAlertActionSheet : NSObject

@property(nonatomic, copy) NSString *title;
@property(nonatomic, copy) NSString *message;

+(instancetype) alertWithWiewController:(UIViewController *)viewController;
+(instancetype) actionSheetWithViewController:(UIViewController *)viewController;
-(instancetype) initWithStyle:(UIAlertControllerStyle)style viewController:(UIViewController *)viewController;
-(void) addCancelActionWithName:(NSString*)name actionBlock:(XMAlertActionActionBlock) block;
-(void) addDangerActionWithName:(NSString*)name actionBlock:(XMAlertActionActionBlock) block;
-(void) addActionWithName:(NSString*)name actionBlock:(XMAlertActionActionBlock) block;
-(void) show;
-(void(^)(NSString *, XMAlertActionActionBlock))toAddCancelAction;
-(void(^)(NSString *, XMAlertActionActionBlock))toAddDangerAction;
-(void(^)(NSString *, XMAlertActionActionBlock))toAddAction;
-(void(^)()) toShow;

@end

NS_ASSUME_NONNULL_END
